package com.athenaeum.datastore.enums;

public enum MailType {
	INBOX("Inbox"), DRAFT("Draft"), SENT("Sent"), OUTBOX("Outbox"), JUNK("Junk"), DELETED("Deleted");
	
	private String displayValue;
	
	private MailType(String displayValue) {
		this.displayValue = displayValue;
	}
	
	public static MailType getMailType(String mailTypeStr) {
		MailType mailType = null;
		for(MailType type : MailType.values()) {
			if(type.displayValue.equalsIgnoreCase(mailTypeStr)) {
				mailType = type;
			}
		}
		return mailType;
	}
	
}
